#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include "QtSql/QtSql"
#include "QList"
#include "QLabel"
#include "docstruct.h"
#include "stoplist.h"
#include "tfcalc.h"
#include "leven.h"
#include "elibraryparser_journal.h"
#include "elibraryparser_author.h"

namespace Ui {
    class MainWindow;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    explicit MainWindow(QWidget *parent = 0);
    ~MainWindow();

private:
    Ui::MainWindow *ui;

protected:
    void contextMenuEvent(QContextMenuEvent *event);

private slots:
    void dbShow();
    void dbOpen();
    void dbTableCreate();
    void dbInsert();
    void dbExec();
    void byAuthor();
    void byJournal();
    void dataAnalys();
    void calcDist();
    void calcJaccard();
    void calcLeven();
    void calcShingle();
    void docSelect();
    void addText();
    void showU();
    void showFT();
    void showJI();
    void showJN();
    void showAN();
    void sameSearch();
    void getID();
    void pubLoad();
    void lstClear();

private:
    QSqlDatabase db;
    QSqlTableModel *model;
    QStringList Annotations;
    QStringList Authors;
    QStringList Journals;
    QStringList analAnnotations;
    QLabel *lblStatus;
    QList<DocStruct> dStruct;
    QList<DocStruct> dStructPure;
    QList<DocStruct> dStructAutoA;
    stopList* stopL;
//    QString connName;

public:
    void addTexts(QStringList sl);
    void fillTable(QList<vect> _qlv);

QAction *showURL;
QAction *showFullText;
QAction *showJournalInfo;
QAction *showJournalName;
QAction *showArticleName;

};

#endif // MAINWINDOW_H
